var menuPath = "/resource";

/**
 * 加载用户菜单
 */
function loadMenu() {
    var menuHtml;
    $.getJSON(menuPath + "/loadMenu", function (list) {
        $('#menuTree').treeview({data: list});


        //recursionMenu(list);
    });
}

function recursionMenu(list) {
    if (list == null || list == 'undefined') {
        return;
    }
    $.each(list, function (i, data) {
        console.log("i:" + i);
        console.log("url:" + data.url);
        console.log("icon:" + data.icon);
        console.log("name:" + data.name);
        recursionMenu(data.menuTrees);
    });
}